#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;

int main()
{
    long long x = 0;
    cin >> x;
    long long i = 1;
    long long prev = 0;
    for (i = 1;i * i < x;i++)
    {
        prev = i;
    }
    if (i * i - x < x - prev * prev)
    {
        cout << i * i << endl;
    }
    else
    {
        cout << prev * prev << endl;
    }
    return 0;
}
